<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>splice 函数的使用</title>
</head>
<body>
<script !src="">
    let arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

    // let result1 = arr.splice(3);
    // console.log(result1);
    // console.log(arr);

    // let result = arr.splice(3,4);
    // console.log(result);
    // console.log(arr);

    // let result = arr.splice(3,4,5);
    // console.log(result);
    // console.log(arr);

    let result = arr.splice(3, 4, 5, 6);
    console.log(result);
    console.log(arr);
</script>
</body>
</html>